package com.example.Annocation.scope;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description TODO
 * @Date 2024/5/14 19:53
 * @Created by houjunfeng
 */
public class ScopeTest {
    @Test
    public void getScope(){
        //测试范围
        ApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(ScopeConfiguration.class);
        System.out.println("ioc容器创建完成");
//        Student student1 = annotationConfigApplicationContext.getBean(Student.class);
//        Student student2 = annotationConfigApplicationContext.getBean(Student.class);
//        System.out.println(student1==student2);
    }
}
